{extend name="base" /}
{block name="body"}
<div class="layui-row layui-col-space15">
    {if !empty($index)}
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-header">快捷方式</div>
            <div class="layui-card-body">
                <div class="index-nav layui-clear">
                    {foreach name="index" item="v" }
                    <a class="layui-col-md1 mb10" href="{$Request.root.true}/{$v.url}"><i class="{$v.icon}"></i> {$v.name}</a>
                    {/foreach}
                </div>
            </div>
        </div>
    </div>
    {/if}
    {if condition="$teacherInfo.uid neq 0"}
    <div class="layui-col-md6">
        <div class="layui-card">
            <div class="layui-card-header">教师信息</div>
            <div class="layui-card-body">
                <form action="{:url('admin/index/teacherInfoSave')}" class="layui-form mt20 layui-form-pane" method="post">
                    <div class="layui-form-item ">
                        <label class="layui-form-label">登录姓名</label>
                        <div class="layui-input-inline">
                            <input type="text" name="username"  disabled="disabled" value="{$teacherInfo.username}" class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-form-item ">
                        <label class="layui-form-label">展示姓名</label>
                        <div class="layui-input-inline">
                            <input type="text" name="showname"   value="{$teacherInfo.showname}" class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">手机号码</label>
                        <div class="layui-input-inline">
                            <input type="text" name="mobile"   value="{$teacherInfo.mobile}"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">个人简介</label>
                        <div class="layui-input-block">
                            <textarea name="brief" lay-verify="required" class="layui-textarea">{$teacherInfo.brief}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">个人签名</label>
                        <div class="layui-input-block">
                            <textarea name="sign" class="layui-textarea">{$teacherInfo.sign}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$teacherInfo['id']}"  class="layui-input">
                            <button class="layui-btn" lay-filter="*" lay-submit="">修改</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="layui-col-md6">
        <div class="layui-card">
            <div class="layui-card-header">个人账户</div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <div class="layui-col-md6">
                        账户总金额：{$profit|default='0'}元
                    </div>
                    <div class="layui-col-md4">
                        可提现金额：{$profit|default='0'}元
                    </div>
                    <div class="layui-col-md2">
                        <a href="{:url('admin/user/tixian')}" type="button" class="layui-btn  layui-btn-xs ajax-iframe"
                           data-width="500px" data-height="400px">提现</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-card">
            <div class="layui-card-header">提现明细</div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <div class="layui-col-md12">
                        <table class="layui-table">
                            <tbody>
                            <tr>
                                <td >提现金额</td>
                                <td >提现途径</td>
                                <td >状态</td>
                                <td >日期</td>
                            </tr>
                            {foreach name="tixianList" item="v" }
                            <tr>
                                <td >{$v.money}元</td>
                                <td >{$v.type}</td>
                                <td >{$v.status|get_tixian_status}</td>
                                <td >{$v.addtime}</td>
                            </tr>
                            {/foreach}
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="page">{$tixianList->render()}</div>
            </div>
        </div>
    </div>
    {/if}
    {if condition="$teacherInfo.uid eq 0"}
    <div class="layui-col-md6">
        <div class="layui-card">
            <div class="layui-card-header">域名授权信息</div>
            <div class="layui-card-body">
                <table class="layui-table">
                    <tbody>
                    <tr>
                        <td style="width:50%;">授权域名：{:get_domain()}</td>
                        {if condition="$authoInfo.authorcode"}
                        <td style="width:50%;">授权码：{$authoInfo.authorcode}</td>
                        {else/}
                        <td>授权码：<input style="width:170px" type="text" name="author_code"  class="layui-input ajax-update layui-input-inline" data-url="{:url('admin/config/addAuthorCode')}"></td>
                        {/if}
                    </tr>
                    <tr>
                        <td style="width:50%;">授权到期：{$authoInfo.endtime}</td>
                        {if condition="$authoInfo.authorcode"}
                        <td style="width:50%;">剩余时间：{$authoInfo.yu} <a  href='{$url}' target="_blank" class="layui-btn layui-btn-sm ml10">续费</a></td>
                        {else/}
                        <td style="width:50%;">剩余时间：<a  href="{$authoInfo.server}authorize"  target="_blank" class="layui-btn layui-btn-sm">去授权</a></td>
                        {/if}
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="layui-col-md6">
        <div class="layui-card">
            <div class="layui-card-header">版本信息</div>
            <div class="layui-card-body">
                <table class="layui-table">
                    <tbody>
                    <tr>
                        <td style="width:50%;">当前版本：{$version}</td>
                        <td style="width:50%;">最新版本：{$lastVersion.version}</td>
						<input type="hidden" id="lastVersion" value="{$lastVersion.version}">
                        <input type="hidden" id="nowVesion" value="{$version}">
                    </tr>
                    <tr>
                        <td colspan="2" style="width:50%;">在线升级：<a  url="{:url('admin/update/Version')}" upurl="{:url('admin/update/index')}"  class="layui-btn layui-btn-sm upversion">一键升级</a></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    {if !empty($server)}
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-header">服务器信息</div>
            <div class="layui-card-body">
                <table class="layui-table">
                    <tbody>
                    <tr>
                        <td style="width:50%;">服务器操作系统：{$server.os}</td>
                        <td style="width:50%;">服务器软件：{$server.sapi}</td>
                    </tr>
                    <tr>
                        <td>PHP版本：{$server.version}</td>
                        <td>MySQL版本：{$server.mysql.0.version}</td>
                    </tr>
                    <tr>
                        <td>根目录：{$server.root}</td>
                        <td>最大执行时间：{$server.max_execution_time}</td>
                    </tr>
                    <tr>
                        <td>文件上传限制：{$server.upload_max_filesize}</td>
                        <td>允许内存大小：{$server.memory_limit}</td>
                    </tr>
                    <tr>
                        <td>服务器时间：{$server.date}</td>
                        <td>官方网站：<a href="{$authoInfo.server}" target="_blank">NewLogo</a></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    {/if}
    {/if}
</div>
{/block}
{block name="js"}
<script src="__COMMON__/upversion.js"></script>
{/block}